//
//  CYHomeViewController.swift
//  MySina
//
//  Created by mac on 2017/1/16.
//  Copyright © 2017年 xinyuan. All rights reserved.
//

import UIKit

class CYHomeViewController: CYBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        if !isLogin {
            baseView?.setupBaseViewInfo(imgName: nil, title: nil)
            return
        }
        setupNavgationBar()
    }

    //设置导航视图
    private func setupNavgationBar() {
        //设置左侧按钮
        navigationItem.leftBarButtonItem = UIBarButtonItem(imgName: "navigationbar_friendsearch", target: self, action: #selector(leftButtonClick))
        //设置右侧按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(imgName: "navigationbar_pop", target: self, action: #selector(rightButtonClick))
    }
}

extension CYHomeViewController {
    @objc fileprivate func leftButtonClick() {
        
    }
    @objc fileprivate func rightButtonClick() {
        //push控制器
        let vc = CYTempViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}












